package com.edu.bean;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;

public class User {
    private int userId;
    @NotEmpty(message = "用户名不能为空")
    @Length(min=6,max=10,message = "用户名长度应该在6-10位之间")

    private String username;
    @NotEmpty(message = "密码不能为空")

    @Length(min=6,max=10,message = "密码长度应该在6-10位之间")
    private String password;
    @Range(min=1,max=120,message = "你确定你这个岁")
    private int userAge;
    private String userSex;


    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getUserAge() {
        return userAge;
    }

    public void setUserAge(int userAge) {
        this.userAge = userAge;
    }

    public String getUserSex() {
        return userSex;
    }

    public void setUserSex(String userSex) {
        this.userSex = userSex;
    }
}
